@8btc/mditor 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +2 -2
- package/dist/index.d.ts +7 -0
- package/dist/index.js +419 -276
- package/dist/index.min.js +1 -1
- package/dist/method.d.ts +10 -10
- package/dist/method.js +3 -3
- package/dist/method.min.js +1 -1
- package/dist/ts/util/attachLineNumbers.d.ts +3 -19
- package/dist/types/index.d.ts +0 -12
- package/package.json +1 -1
- package/src/index.ts +23 -1
- package/src/method.ts +42 -21
- package/src/ts/util/attachLineNumbers.ts +15 -4
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v0.0.
|
|
2
|
+
* Vditor v0.0.6 - A markdown editor written in TypeScript.
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
/*!
|
|
28
|
-
* Vditor v0.0.
|
|
28
|
+
* Vditor v0.0.6 - A markdown editor written in TypeScript.
|
|
29
29
|
*
|
|
30
30
|
* MIT License
|
|
31
31
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,13 @@ declare class Vditor extends VditorMethod {
|
|
|
16
16
|
setTheme(theme: "dark" | "classic", contentTheme?: string, codeTheme?: string, contentThemePath?: string): void;
|
|
17
17
|
/** 获取 Markdown 内容 */
|
|
18
18
|
getValue(): string;
|
|
19
|
+
/**
|
|
20
|
+
* 手动更新行号
|
|
21
|
+
* - 读取当前模式下的 Markdown 文本并为对应编辑区域同步/节流写入 data-linenumber
|
|
22
|
+
* - 依赖配置 `lineNumber: true`,关闭时直接跳过以提升性能
|
|
23
|
+
* @param immediate 为 true 时立即更新;默认为节流更新以避免频繁调用
|
|
24
|
+
*/
|
|
25
|
+
updateLineNumbers(immediate?: boolean): void;
|
|
19
26
|
/** 获取编辑器当前编辑模式 */
|
|
20
27
|
getCurrentMode(): "sv" | "wysiwyg" | "ir";
|
|
21
28
|
/** 聚焦到编辑器 */
|